<h1>Listing relations</h1>

<table>
  <tr>
    <th>Type</th>
    <th>Object</th>
    <th>Subject</th>
    <th>Created at</th>
    <th>Updated at</th>
    <th>Deleted at</th>
  </tr>
  
<% for relation in @relations %>
  <tr>
    <td><%=h relation.type %></td>
    <td><%=h relation.object_id %></td>
    <td><%=h relation.subject_id %></td>
    <td><%=h relation.created_at %></td>
    <td><%=h relation.updated_at %></td>
    <td><%=h relation.deleted_at %></td>
    <td><%= link_to 'Show', relation_path(relation) %></td>
    <td><%= link_to 'Edit', edit_relation_path(relation) %></td>
    <td><%= link_to 'Destroy', relation_path(relation), :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New relation', new_relation_path %>